{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "NL\n",
    "===\n",
    "\n",
    "____\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### K-近邻\n",
    "通过测量不同特征值之间的距离进行分类\n",
    "\n",
    "___\n",
    "对于未知类别属性数据集中的点：\n",
    "1. 计算已知类别数据集中的点与当前点的距离\n",
    "2. 按照距离依次排序\n",
    "3. 选取与当前点距离最小的K个点\n",
    "4. 确定前K个点所在类别的出现概率\n",
    "5. 返回前K个点出现频率最高的类别作为当前点预测分类\n",
    "\n",
    "<img src=\"../data/note_img/KNN.jpg\" width=\"150\" hegiht=\"150\" style=\"margin-left: 100px;\" />\n",
    "\n",
    "* KNN分类器不需要使用训练集进行训练，训练时间复杂度为 0\n",
    "* KNN分类的计算复杂度和训练集中的文档数目成正比，分类时间复杂度为 O(n)\n",
    "___\n",
    "K 值的选择，距离度量和分类决策规则是该算法的三个基本要素:\n",
    "1. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
